package com.syh.jn.scm.domain.downstream.repository.base;

import com.syh.core.ddd.infrastructure.repository.AggregateRepository;
import com.syh.jn.scm.domain.downstream.entity.base.logistics.DownLogistics;
import com.syh.jn.scm.domain.downstream.entity.base.logistics.DownLogisticsAddress;
import com.syh.jn.scm.domain.downstream.entity.base.logistics.DownLogisticsTruck;
import com.syh.jn.scm.dto.downstream.base.logistics.logisticsAddress.DownLogisticsAddressVo;
import com.syh.jn.scm.dto.downstream.base.logistics.logisticsTruck.DownLogisticsTruckVo;

import java.util.List;

public interface DownLogisticsRepository extends DownLogisticsReadRepository, AggregateRepository<DownLogistics, Long> {
  /**
   * 批量保存物流服务地址
   * @param addressList
   */
  void batchSaveAddress(List<DownLogisticsAddress> addressList);

  /**
   * 批量修改物流服务地址
   * @param addressList
   */
  void batchModifyAddress(List<DownLogisticsAddress> addressList);

  /**
   * 根据地址id获取地址
   * @param addressId
   * @return
   */
  DownLogisticsAddress getByAddressId(Long addressId);

  /**
   * 删除地址
   * @param address
   */
  void deleteAddress(DownLogisticsAddress address);

  /**
   * 批量保存物流服务车型
   * @param truckList
   */
  void batchSaveTruck(List<DownLogisticsTruck> truckList);

  /**
   * 批量修改物流服务车型
   * @param truckList
   */
  void batchModifyTruck(List<DownLogisticsTruck> truckList);

  /**
   * 删除车型
   * @param
   */
  void deleteTruck(DownLogisticsTruck truck);

  /**
   * 根据车型id查询车型
   * @param truckId
   * @return
   */
  DownLogisticsTruck getByTruckId(Long truckId);
  /**
   * 根据物流id获取地址列表
   * @param logisticsId
   * @return
   */
  List<DownLogisticsAddressVo> getAddressListById(Long logisticsId);

  /**
   * 根据物流id获取服务服务车型列表
   * @param logisticsId
   * @return
   */
  List<DownLogisticsTruckVo> getTruckListById(Long logisticsId);
}
